Patent document 1 discloses an entrapment detection device for a door window that is opened and closed by a motor. The entrapment detection device includes an electrostatic sensor that includes an electrode arranged on the door window. If the electrostatic sensor detects entrapment of an object during a closing operation of the door window, the rotation or the motor is automatically reversed to open the door window. This frees the entrapped object.